package it.truestoryfactory.tsq.game;

import it.truestoryfactory.tsq.R;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.util.Log;

public class GO_SettingsFragment extends PreferenceFragment {
	
	@Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);

	        // Load the preferences from an XML resource
	        addPreferencesFromResource(R.xml.preferences);
			Log.d(this.getClass().getName(), "sto registrando il listener delle preference");
			 
	    }
	 
	 
	public void unregisterListener(OnSharedPreferenceChangeListener listener) {
		getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(listener);
		Log.d(this.getClass().getName(), "sto scollegando il listener delle preference");
	}

	public void registerListener(OnSharedPreferenceChangeListener listener) {
		 getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(listener);
		 Log.d(this.getClass().getName(), "sto registrando il listener delle preference");
	}
	 

}
